#include"1.h"
void test1() {
    slist* node1 = (slist*)malloc(sizeof(slist));
    node1->n = 1;
    slist* node2 = (slist*)malloc(sizeof(slist));
    node2->n = 2;
    slist* node3 = (slist*)malloc(sizeof(slist));
    node3->n = 3;
    slist* node4 = (slist*)malloc(sizeof(slist));
    node4->n = 4;

    node1->next = node2;
    node2->next = node3;
    node3->next = node4;
    node4->next = NULL;

    slist* phead = node1;
    Print(phead);
}
void test2() {
    slist* node1 = Malloc(1);
    slist* node2 = Malloc(2);
    slist* node3 = Malloc(1);
    slist* node4 = Malloc(1);

    node1->next = node2;
    node2->next = node3;
    node3->next = node4;
    node4->next = NULL;

    slist* phead = node1;
    Print(phead);
}
void test3() {
    slist* plist = NULL;
    Pushback(&plist, 1);
    Pushback(&plist, 3);
    Pushback(&plist, 2);
    slist* find = Find(plist, 1);
    InsertAfter(plist, find, 4);
    //1 3 2 4
    Print(plist);
    SLTErase(&plist, find);
    Print(plist);
    SLTDestroy(&plist);
    Print(plist);
}
int main(){
    
    test3();
    return 0;
}